package com.android.task5;

import android.util.Log;

public class FlickrPhotoUrl {
	
	private final static String INFO_TAG = "Flickr Photo Url Info";
	
	private String farmId;
	private String serverId;
	private String photoId;
	private String secret;
	
	private String downloadUrl;
	
	public FlickrPhotoUrl(String farmId, String serverId, String photoId, String secret){
		this.setFarmId(farmId);
		this.setServerId(serverId);
		this.setPhotoId(photoId);
		this.setSecret(secret);
		
		downloadUrl = "http://farm" + farmId + ".static.flickr.com/" + serverId + "/" + photoId + "_" + secret+ "_s.jpg"; 
	}
	
	public String getDownloadUrl(){
		return downloadUrl;
	}
	
	public void getInfo(){
		Log.i(INFO_TAG, downloadUrl);
	}

	public void setFarmId(String farmId) {
		this.farmId = farmId;
	}

	public String getFarmId() {
		return farmId;
	}

	public void setServerId(String serverId) {
		this.serverId = serverId;
	}

	public String getServerId() {
		return serverId;
	}

	public void setPhotoId(String photoId) {
		this.photoId = photoId;
	}

	public String getPhotoId() {
		return photoId;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	public String getSecret() {
		return secret;
	}

}
